import { DEFAULT_LAYOUT } from '../base'
import { AppRouteRecordRaw } from '../types'

const Base: AppRouteRecordRaw = {
  path: '/system',
  name: 'system',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: '系统',
    requiresAuth: true,
    icon: 'icon-settings',
    order: 11,
  },
  children: [
    {
      path: '/system/banner', // The midline path complies with SEO specifications
      name: 'systemBanner',
      component: () => import('@/views/system/banner.vue'),
      meta: {
        locale: '轮播图管理',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: '/system/imgLibrary', // The midline path complies with SEO specifications
      name: 'systemimgLibrary',
      component: () => import('@/views/system/imgLibrary.vue'),
      meta: {
        locale: '素材库管理',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: '/system/config', // The midline path complies with SEO specifications
      name: 'systemConfig',
      component: () => import('@/views/system/config.vue'),
      meta: {
        locale: '配置中心',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: '/system/timer', // The midline path complies with SEO specifications
      name: 'systemTimer',
      component: () => import('@/views/system/timer.vue'),
      meta: {
        locale: '定时任务',
        requiresAuth: true,
        roles: ['*'],
      },
    },

    {
      path: '/system/dictionary', // The midline path complies with SEO specifications
      name: 'systemDictionary',
      component: () => import('@/views/system/dictionary.vue'),
      meta: {
        locale: '业务字典配置',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: '/system/params', // The midline path complies with SEO specifications
      name: 'systemparams',
      component: () => import('@/views/system/params.vue'),
      meta: {
        locale: '参数管理',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: '/system/msg', // The midline path complies with SEO specifications
      name: 'systemMsg',
      component: () => import('@/views/system/msg.vue'),
      meta: {
        locale: '消息通知设置',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: '/system/resource', // The midline path complies with SEO specifications
      name: 'systemresource',
      component: () => import('@/views/system/resource/index.vue'),
      meta: {
        locale: '资源管理',
        requiresAuth: true,
        roles: ['*'],
      },
      children: [
        {
          path: '/system/resource/sms', // The midline path complies with SEO specifications
          name: 'systemresourcesms',
          component: () => import('@/views/system/resource/sms.vue'),
          meta: {
            locale: '短信管理',
            requiresAuth: true,
            roles: ['*'],
          },
        },
        {
          path: '/system/resource/oss', // The midline path complies with SEO specifications
          name: 'systemresourceoss',
          component: () => import('@/views/system/resource/oss.vue'),
          meta: {
            locale: '对象存储',
            requiresAuth: true,
            roles: ['*'],
          },
        },
      ],
    },
    {
      path: '/system/officialAccount', // The midline path complies with SEO specifications
      name: 'systemOfficialAccount',
      component: () => import('@/views/system/officialAccount/index.vue'),
      meta: {
        locale: '公众号',
        requiresAuth: true,
        roles: ['*'],
      },
      children: [
        {
          path: '/system/officialAccount/menus', // The midline path complies with SEO specifications
          name: 'systemOfficialAccountMenus',
          component: () => import('@/views/system/officialAccount/menus.vue'),
          meta: {
            locale: '微信菜单配置',
            requiresAuth: true,
            roles: ['*'],
          },
        },
        {
          path: '/system/officialAccount/keywords', // The midline path complies with SEO specifications
          name: 'systemOfficialAccountkeywords',
          component: () => import('@/views/system/officialAccount/keywords.vue'),
          meta: {
            locale: '关键字回复',
            requiresAuth: true,
            roles: ['*'],
          },
        },
        {
          path: '/system/officialAccount/follow', // The midline path complies with SEO specifications
          name: 'systemOfficialAccountfollow',
          component: () => import('@/views/system/officialAccount/follow.vue'),
          meta: {
            locale: '微信关注回复',
            requiresAuth: true,
            roles: ['*'],
          },
        },
        {
          path: '/system/officialAccount/msg', // The midline path complies with SEO specifications
          name: 'systemOfficialAccountmsg',
          component: () => import('@/views/system/officialAccount/msg.vue'),
          meta: {
            locale: '无效关键词回复',
            requiresAuth: true,
            roles: ['*'],
          },
        },
      ],
    },

    {
      path: '/system/log', // The midline path complies with SEO specifications
      name: 'systemLog',
      component: () => import('@/views/system/log.vue'),
      meta: {
        locale: '操作日志',
        requiresAuth: true,
        roles: ['*'],
      },
    },
  ],
}

export default Base
